package cn.silver.module.system.enums;

import cn.silver.framework.core.model.DictModel;
import cn.silver.framework.core.utils.StreamUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * 组织经营状态
 * @author zhouxiaobo
 */
@Getter
@AllArgsConstructor
public enum DeptStatusEnums {
    NORMARL("00","存续"),
    EMPLOYED("01","在业"),
    DEACTIVE("02","吊销"),
    CLOSES("03","注销"),
    IMMIGRATE("04","迁入"),
    EMIGRATE("05","迁出"),
    SHUTDOWN("06","停业"),
    LIQUIDATE("06","清算"),
    ;
    private final String code;
    private final String name;

    public static List<DictModel> getModels() {
        return StreamUtils.toList(Arrays.asList(values()), item -> new DictModel(item.name, item.code));
    }
}
